﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

public static class StaticFunctions
{   
    /// <summary>
    /// Convert the value of this instance to its equivalent guid representaion.
    /// </summary>
    /// <param name="s">The string input for convert to guid.</param>
    /// <returns></returns>    
    public static Guid ToGuid(this string s)
    {
        if (String.IsNullOrEmpty(s))
            s = "00000000-0000-0000-0000-000000000000";
        Guid returnValue = default(Guid);
        returnValue = XmlConvert.ToGuid(s);
        return returnValue;
    }

}